<%-------------------------------------------------------------------
 * 页面名称：paySuccess.jsp
 * 功能描述：公共事业费缴费成功页面
 * Action: 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%
	String path = request.getContextPath();

	String strServer = request.getServerName();
	if (strServer.indexOf("unspay") < 0) {
		// 测试系统
		strServer = "http://" + strServer + ":"
		+ request.getServerPort();
	} else {
		// 生产系统
		strServer = "https://" + strServer;
	}
	path = strServer + path;
%>
<html>
	<head>
		<title>公共事业缴费</title>
		<meta name="keywords" content="公共事业网上缴费" />
		<meta name="description" content="公共事业费 、公共事业网上缴费、水费、电费、煤气费、天燃气、手机费、" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="<%=path%>/page/information/css/style.css" rel="stylesheet"
			type="text/css" />
		<link href="<%=path%>/page/information/css/font.css" rel="stylesheet"
			type="text/css" />
		<link href="<%=path%>/css/newstyle.css" rel="stylesheet"
			type="text/css" />
		<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<!-- 页头菜单 -->
		<jsp:include page="/page/information/head.jsp?currentFunc=publicfee" />
		<!--主内容-->
		<div id="reckoningList">
			<div class="reckoningList_title">
				公共事业缴费电子凭证
			</div>
			<div class="reckoningList_content">
				<div class="reckoningList_code">
					交易流水号：
					<bean:write name="detail" property="transaction.transId" />
				</div>
				<div>
					<table width="100%" class="tablestyle">
						<tr>
							<th colspan="5" align="left">
								<span class="reckoningTitle_14">账单信息</span>
							</th>
						</tr>
						<tr>
							<td class="reckoningTitle_12">
								条形码
							</td>
							<td class="reckoningTitle_12">
								缴费类型
							</td>
							<td class="reckoningTitle_12">
								公共事业单位
							</td>
							<td class="reckoningTitle_12">
								金额
							</td>
							<td class="reckoningTitle_12">
								账期
							</td>
						</tr>
						<tr>
							<td>
								<bean:write name="detail" property="barCode" />
							</td>
							<td>
								<bean:write name="detail"
									property="barCodePayCorp.barCodePayType.name" />
							</td>
							<td>
								<bean:write name="detail" property="barCodePayCorp.name" />
							</td>
							<td>
								<span class="fontred"><bean:write name="detail"
										property="amount" format="0.00" /> </span>元
							</td>
							<td>
								<bean:write name="detail" property="chargeDate" format="yyyy-MM" />
							</td>
						</tr>
					</table>
				</div>
				<div style="height:18px;"></div>
				<div>
					<table width="100%" border="0" align="center" cellpadding="7"
						cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
						<tr>
							<td bgcolor="#fffdf5">
								<table width="100%" border="0" cellpadding="3" cellspacing="0">
									<tr>
										<td width="3%" height="25" valign="top"
											style="border-bottom:1px solid #ccc;"></td>
										<td width="97%" align="left" class="red12b"
											style="border-bottom:1px solid #ccc;">
											特别提醒
										</td>
									</tr>
									<tr>
										<td valign="top">
											&nbsp;
										</td>
										<td align="left" class="font_gray">
											<img src="<%=path%>/images/arrow2.gif" width="16" height="16"
												align="absmiddle" />
											请记住您的账单信息，如有疑问请致电客服电话：
											<span class="fontred"> </span>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</div>

				<div class="reckoningList_code02">
					以下信息是公共事业缴费系统对本笔交易的电子签名，您可以保存和打印本页面作为交易原始凭证。
					<br />
				</div>
				<div class="reckoningList_code03">
					<div class="reckoningList_topline"></div>
					<div class="reckoningList_name">
						<span class="reckoningTitle_12">电子签名： </span>
						<bean:write name="mac" />
						<div id="cachet">
							<img src="<%=path%>/page/information/images/reckoning_pic02.gif"
								width="129" height="83" />
						</div>
					</div>

				</div>
				<div class="reckoningList_code04">
					<input name="buttonReturn" type="button" class="public_button"
						value="保存页面" onclick="fSavePage()" />

					<input name="buttonReturn2" type="button" class="public_button"
						value="打印页面" onclick="fPrint()" />
					<logic:present name="flag">
						<input name="buttonReturn3" type="button" class="public_button"
							value="关闭" onclick="window.close();" />
					</logic:present>
					<logic:notPresent name="flag">
						<input name="buttonReturn3" type="button" class="public_button"
							value="返回缴费首页"
							onclick="location='<%=path%>/page/barcodepay/toBarCodePay.do'" />
					</logic:notPresent>
				</div>

			</div>

		</div>
		<div style="clear:both;"></div>
		<div style="display:none;">
			<div id="reckoningList_print">
				<div class="reckoningList_content_print">
					<div class="reckoningList_title_print">
						公共事业缴费电子凭证
					</div>
					<div class="reckoningList_code">
						交易流水号：
						<bean:write name="detail" property="transaction.transId" />
					</div>
					<div>
						<table width="584" class="tablestyle">
							<tr>
								<th colspan="5" align="left">
									<span class="reckoningTitle_14">账单信息</span>
								</th>
							</tr>
							<tr>
								<td class="reckoningTitle_12">
									条形码
								</td>
								<td class="reckoningTitle_12">
									缴费类型
								</td>
								<td class="reckoningTitle_12">
									公共事业单位
								</td>
								<td class="reckoningTitle_12">
									金额
								</td>
								<td class="reckoningTitle_12">
									账期
								</td>
							</tr>
							<tr>
								<td>
									<bean:write name="detail" property="barCode" />
								</td>
								<td>
									<bean:write name="detail"
										property="barCodePayCorp.barCodePayType.name" />
								</td>
								<td>
									<bean:write name="detail" property="barCodePayCorp.name" />
								</td>
								<td>
									<span class="fontred"><bean:write name="detail"
											property="amount" format="0.00" /> </span>元
								</td>
								<td>
									<bean:write name="detail" property="chargeDate"
										format="yyyy-MM" />
								</td>
							</tr>
						</table>
					</div>
					<div style="height:18px;"></div>
					<div>
						<table width="100%" border="0" align="center" cellpadding="7"
							cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
							<tr>
								<td bgcolor="#fffdf5">
									<table width="100%" border="0" cellpadding="3" cellspacing="0">
										<tr>
											<td width="3%" height="25" valign="top"
												style="border-bottom:1px solid #ccc;"></td>
											<td width="97%" align="left" class="red12b"
												style="border-bottom:1px solid #ccc;">
												特别提醒
											</td>
										</tr>
										<tr>
											<td valign="top">
												&nbsp;
											</td>
											<td align="left" class="font_gray">
												<img src="<%=path%>/images/arrow2.gif" width="16"
													height="16" align="absmiddle" />
												请记住您的账单信息，如有疑问请致电客服电话：
												<span class="fontred"> </span>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</div>

					<div class="reckoningList_code02" style="width:584px;">
						以下信息是公共事业缴费系统对本笔交易的电子签名，您可以保存和打印本页面作为交易原始凭证。
						<br />
					</div>
					<div class="reckoningList_code03" style="width:584px;">
						<div class="reckoningList_topline"></div>
						<div class="reckoningList_name" style="height:95px;">
							<span class="reckoningTitle_12">电子签名： </span>
							<bean:write name="mac" />
							<div id="cachet">
								<img src="<%=path%>/page/information/images/reckoning_pic02.gif"
									width="129" height="83" />
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<!-- 页尾菜单 -->
		<jsp:include page="/page/information/foot.jsp" />
		<SCRIPT LANGUAGE="JavaScript">
<!--
function fSavePage(){
	if (document.execCommand){
		var paydate =<bean:write name="detail" property="chargeDate" format="yyyyMM"/> ;
		var docname= "<bean:write name="detail" property="barCodePayCorp.name"/>"
		+'-'+paydate;
		document.execCommand('SaveAs', true, docname);      
	}else{
		alert('Feature available only in Internet Exlorer 4.0 and later.');
	}
}
function fPrint1() {
	document.execCommand('Print', true, '');

    return ;
}

function fPrint(){
	var newWin = window.open('about:blank','','width=645,height=485');
	var titleHTML = document.getElementById("reckoningList_print").innerHTML;
		newWin.document.write('<head>');
		newWin.document.write("<link href='<%=path%>/page/information/css/style.css' rel='stylesheet' type='text/css' />");
		newWin.document.write("<link href='<%=path%>/page/information/css/font.css' rel='stylesheet' type='text/css' />");
		newWin.document.write('</head>');
		newWin.document.write(titleHTML);
		newWin.document.location.reload();
		newWin.print();
	}
//-->
</SCRIPT>
	</body>
</html>
